{extend name="public/common-base" /}
{block name="title"}商品列表{/block}

{block name="style"}
<link rel="stylesheet" type="text/css" href="__STATIC__/index/css/search.css" />
<style>
	@media screen and (min-width:1260px) and (max-width: 1465px) {
		.w1430{width: 1224px;}
	}
	@media screen and (max-width: 1260px) {
		.w1430{width: 983px;}
	}
</style>

{/block}

{block name="main"}
	<div class="in-public Shopping-Mall">

					<div class="Shopping-Mall-3">
						<!--
						<h2 class="Shopping-Mall-title-1 clearfix">
							<strong>餐具系列</strong>
							<span></span>
							<p>所有商品</p>
						</h2>
						<div class="Shopping-Mall-title-2 clearfix">
							<span class="span-5">
								下级分类
							</span>
							<p class="clearfix">
								<a href="#">陶瓷</a>
								<a href="#">合金</a>
								<a href="#">金银</a>
								<a href="#">不锈钢</a>
								<a href="#">玻璃</a>
								<a href="#">塑料</a>
							</p>
						</div>
						-->

						<div class="search-box p">
							<div class="w1430">
								<div class="search-path fl">
									<a href="/index.php/Home/Goods/goodsList/id/1.html">全部结果</a>
									<!--
									<i class="litt-xyb"></i>
									<a href="/index.php/Home/Goods/goodsList/id/1.html">手机 、 数码 、 通信</a>
									<i class="litt-xyb"></i>

									<div class="havedox">
										<div class="disenk"><span><a href="/index.php/Home/Goods/goodsList/id/1.html"><?=$currentGoodsCate['name']?></a></span><i class="litt-xxd"></i></div>
										<div class="hovshz">
											<ul>
											</ul>
										</div>
									</div>
									-->
									<i class="litt-xyb"></i>

								</div>


								<?php foreach($filter_menu as $k=>$v){ ?>
									<a title="{$v.text}" href="{$v.href}" class="u-av-label">{$v.text}<i>x</i></a>
								<?php } ?>


								<div class="search-clear fr">
									<span><a href="<?=url('index/goods/goodsList',['cat_id'=>$cat_id])?>">清空筛选条件</a></span>
								</div>
							</div>
						</div>

						<div class="search-opt troblect">
							<div class="w1430">
								<div class="opt-list">
									<!-- 品牌筛选 start -->
									<?php if(!empty($filter_brand)){?>
										<dl class="brand-section m-tr">
											<dt>品牌</dt>
											<dd class="ri-section">
												<div class="lf-list">
													<div class="brand-box brand-list">
														<div class="clearfix p">
															<?php foreach($filter_brand as $k=>$v){?>
																<a href="<?=$v['href']?>" data-href="<?=$v['href']?>"  data-key='brand' data-val="<?=$v['id']?>">
																	<i class="litt-zd"></i>
																	<img src="/<?=$v['logo']?>"/>
																	<span>品牌-<?=$v['name']?></span>
																</a>
															<?php } ?>
														</div>
														<div class="surclofix p">
															<a href="javascript:;" class="u-confirm" onClick="submitMoreFilter('brand',this);">确定</a>
															<a href="javascript:;" class="u-cancel">取消</a>
														</div>
													</div>
												</div>
												<div class="lr-more">
													<a href="javascript:void(0)"><span class="dx_choice">多选</span><i class="litt-pluscr"></i></a>

														<?php if(count($filter_brand) > 10){?>
														<a href="javascript:void(0)"> <span class="gd_more">更多</span><i class="litt-tcr"></i></a>
														<?php } ?>

												</div>
											</dd>
										</dl>
									<?php } ?>
									<!-- 品牌筛选 end -->

									<!-- 规格筛选 start -->

									<?php if(!empty($filter_spec)){ foreach($filter_spec as $k=>$v){?>
										<?php if(!empty($v['item'])){?>
										<dl class="brand-section m-tr">
												<dt>{$v.name}</dt>
												<dd class="ri-section">
													<div class="lf-list">
														<div class="brand-list">
															<div class="clearfix p">
																<?php if(!empty($v['item'])){foreach($v['item'] as $k2=>$v2){?>
																	<a href="{$v2.href}" data-href="{$v2.href}" data-key='{$v2.key}' data-val='{$v2.val}'>
																		<input class="shaix_la" type="checkbox" style="display: none"/>
																		<span>{$v2.item}</span>
																	</a>
																<?php }} ?>
															</div>
															<div class="surclofix p">
																<a href="javascript:;" class="u-confirm" onClick="submitMoreFilter('spec',this);">确定</a>
																<a href="javascript:;" class="u-cancel">取消</a>
															</div>
														</div>
													</div>
													<div class="lr-more">
														<a href="javascript:void(0)"><span class="dx_choice">多选</span><i class="litt-pluscr"></i></a>

														<?php if(count($v['item']) > 11){?>
															<a href="javascript:void(0)"><span class="gd_more">更多</span><i class="litt-tcr"></i></a>
														<?php } ?>
													</div>
												</dd>
											</dl>
										<?php } ?>
									<?php }}?>

									<!-- 规格筛选 end -->


									<!-- 属性筛选 start -->
									<?php if(!empty($filter_attr)){ foreach($filter_attr as $k=>$v){?>
										<dl class="brand-section m-tr">
											<dt>{$v.attr_name}</dt>
											<dd class="ri-section">
												<div class="lf-list">
													<div class="brand-list">
														<div class="clearfix p">
															<?php foreach($v['attr_value'] as $k2=>$v2){ ?>
																<a href="{$v2.href}" data-href="{$v2.href}" data-val='{$v2.val}' data-key='{$v2.key}'>
																	<input class="shaix_la" type="checkbox" style="display: none"/>
																	<span >{$v2.attr_value}</span>
																</a>
															<?php }?>
														</div>
														<div class="surclofix p">
															<a href="javascript:;" class="u-confirm"  onClick="submitMoreFilter('attr',this);">确定</a>
															<a href="javascript:;" class="u-cancel">取消</a>
														</div>
													</div>
												</div>
												<div class="lr-more">
													<a href="javascript:void(0)"><span class="dx_choice">多选</span><i class="litt-pluscr"></i></a>

													<?php if(count($v['attr_value']) > 11){?>
														<a href="javascript:void(0)"><span class="gd_more">更多</span><i class="litt-tcr"></i></a>
														<?php } ?>
													</if>
												</div>
											</dd>
										</dl>
									<?php }} ?>
									<!-- 属性筛选 end -->


									<!-- 价格筛选 start -->
									<?php if(!empty($filter_price)){?>
										<dl class="brand-section m-tr">
											<dt>价格</dt>
											<dd class="ri-section">
												<div class="lf-list">
													<div class="brand-list">
														<div class="clearfix p">
															<?php foreach($filter_price as $k=>$v){ ?>
																<a href="{$v.href}">
																	<span>{$v.value}</span>
																</a>
															<?php } ?>
														</div>
													</div>
												</div>
												<div class="lr-more">
													<!--<a href="javascript:void(0)"><span class="dx_choice">多选</span><i class="litt-pluscr"></i></a>-->
													<!--<a href="javascript:void(0)"><span class="gd_more">更多</span><i class="litt-tcr"></i></a>-->
													<!--填写筛选价格区间-s-->
													<form action="<?php echo urldecode(url('/index/goods/goodsList',$filter_param,''));?>" method="post" id="price_form">
														<input type="text" onpaste="this.value=this.value.replace(/[^\d]/g,'')" onkeyup="this.value=this.value.replace(/[^\d]/g,'')" name="start_price" id="start_price" value=""/>
														<span>-</span>
														<input type="text" onpaste="this.value=this.value.replace(/[^\d]/g,'')" onkeyup="this.value=this.value.replace(/[^\d]/g,'')"  name="end_price" id="end_price" value=""/>
														<input type="submit" value="确定" onClick="if($('#start_price').val() !='' && $('#end_price').val() !='' ) $('#price_form').submit();"/>
													</form>
													<!--填写筛选价格区间-e-->
												</div>
											</dd>
										</dl>
									<?php }?>
									<!-- 价格筛选 end -->
								</div>
								<p class="moreamore"><a class="red">收起</a></p>
							</div>
						</div>


						<div class="Shopping-Mall-3-1 clearfix">

							<div class="Shopping-Mall-3-1-left">
								<h2 class="Shopping-Mall-3-1-left-title-1">
									<strong>推荐商品</strong>
								</h2>

								<ul class="Shopping-Mall-3-1-left-1">
									<?php if(!empty($recommendGoods)){ foreach($recommendGoods as $k=>$v){?>
									<li>
										<a href="url('index/goods/goodsDeatil',['goods_id'=>$v['goods_id']])">
										<span>
											<img src="/<?=$v['original_img']?>" alt=""  />
											<i></i>
										</span>
										<h2><?=$v['goods_name']?></h2>
										<h3 class="clearfix">
											<strong>
												¥ <?=$v['shop_price']?>
											</strong>
											<p>已售<i><?=$v['sales_sum']?></i>件</p>
										</h3>
										</a>
									</li>
									<?php }} ?>
								</ul>

							</div>

							<div class="Shopping-Mall-3-1-right">
								<form>
								<div class="Shopping-Mall-3-1-right-1 clearfix">
									<ul class="clearfix Shopping-Mall-3-1-right-1-ul1">
										<li class="Shopping-Mall-3-1-right-1-1">
											<a href="<?php echo urldecode(url("/index/goods/goodsList",$filter_param,''));?>" class="<?=input('sort')==''?'active-21':''?>" >上架时间</a>
										</li>
										<li class="Shopping-Mall-3-1-right-1-1">
											<a href="<?php echo urldecode(url("/index/goods/goodsList",array_merge($filter_param,array('sort'=>'sales_sum')),''));?>" class="<?=input('sort')=='sales_sum'?'active-21':''?>">销量</a>
										</li>
										<li class="Shopping-Mall-3-1-right-1-1">
											<a href="<?php echo urldecode(url("/index/goods/goodsList",array_merge($filter_param,array('sort'=>'shop_price')),''));?>" class="<?=input('sort')=='shop_price'?'active-21':''?>">价格</a>
										</li>
										<li class="Shopping-Mall-3-1-right-1-1">
											<a href="<?php echo urldecode(url("/index/goods/goodsList",array_merge($filter_param,array('sort'=>'comment_count')),''));?>" class="<?=input('sort')=='comment_count'?'active-21':''?>">评论数</a>
										</li>

									</ul>


									<ul class="clearfix Shopping-Mall-3-1-right-1-ul2">
										<!--
										<li class="Shopping-Mall-3-1-right-1-3 Shopping-Mall-3-1-right-1-5">
											<section class="clearfix">
												<div class="diy_select">
													<div class="select-text clearfix">
														<input type="hidden" name="" id="a" class="diy_select_input" />
														<div class="diy_select_txt">来源</div>
														<div class="diy_select_btn"></div>
													</div>
													<div class="select-option">
														<ul class="diy_select_list diy_select_list1">
															<li>-请选择-</li>
															<li>来源Ａ来源Ａ来源Ａ来源Ａ来源Ａ来源Ａ来源Ａ来源Ａ来源Ａ来源Ａ来源Ａ来源Ａ</li>
															<li>来源Ｂ</li>
															<li>来源Ｃ</li>
															<li>来源Ｄ</li>
															<li>来源Ｅ</li>
															<li>来源Ｆ</li>
															<li>来源Ｇ</li>
															<li>来源Ｈ</li>
															<li>来源Ｉ</li>
															<li>来源Ｊ</li>
															<li>来源Ｋ</li>
														</ul>
													</div>
												</div>
												<script src="/static/index/js/section.js"></script>
											</section>

										</li>

										<li class="Shopping-Mall-3-1-right-1-3">

											<section class="clearfix">
												<div class="diy_select">
													<div class="select-text">
														<input type="hidden" name="" id="ｂ" class="diy_select_input" />
														<div class="diy_select_txt">颜色</div>
														<div class="diy_select_btn"></div>
													</div>
													<div class="select-option">
														<ul class="diy_select_list diy_select_list2">
															<li>-请选择-</li>
															<li>赤赤赤赤赤赤赤赤赤赤赤赤赤赤赤赤赤赤赤赤赤赤赤赤赤赤赤</li>
															<li>橙</li>
															<li>黄</li>
															<li>绿</li>
															<li>青</li>
															<li>蓝</li>
															<li>紫</li>
														</ul>
													</div>
												</div>

												<script src="/static/index/js/section.js"></script>
											</section>

										</li>

										<li class="Shopping-Mall-3-1-right-1-4">
											<div class="clearfix">
												<select id="province">
													<option>选择省</option>
													<option>北京A1</option>
													<option>上海A2</option>
													<option>江苏A3</option>
												</select>
												<select class="city city_first">
													<option>选择市</option>
												</select>
												<select class="city">
													<option>东城</option>
													<option>西城</option>
													<option>崇文</option>
													<option>宣武</option>
													<option>朝阳</option>
												</select>
												<select class="city">
													<option>黄浦</option>
													<option>卢湾</option>
													<option>徐汇</option>
													<option>长宁</option>
													<option>静安</option>
												</select>
												<select class="city">
													<option>南京</option>
													<option>镇江</option>
													<option>苏州</option>
													<option>南通</option>
													<option>扬州</option>
												</select>
											</div>

											<script>
												$(document).ready(function(){
													$("#province").change(function(){
													    var index = $(this).get(0).selectedIndex;
													        $('.city').hide().eq(index).show();
													    });
												});
											</script>

										</li>
										-->
										<li class="Shopping-Mall-3-1-right-1-2">

											<form id="figure_nu_form" action="<?php echo urldecode(url('/index/goods/goodsList',$filter_param,''));?>" method="post">
											<input type="text" name="search_key" id="figure_nu" placeholder="输入图号进行搜索" />
											<button type="submit" name="" onClick="if($('#figure_nu').val() !='' ) $('#figure_nu_form').submit();"></button>
											</form>
										</li>
									</ul>


								</div>
									<!--
								<div class="Shopping-Mall-3-1-right-2">
									<ul class="clearfix">

										<li class="clearfix">
											<span>配送至</span>
											<div>
												<input type="text" value="" size="15" id="getcity_name" name="getcity_name" mod="address|notice" mod_address_source="hotel" mod_address_reference="getcityid" mod_notice_tip="中文/拼音" />
												<input id="getcityid" name="getcityid" type="hidden" value="" />
											</div>
											<script type="text/javascript" src="/static/index/js/fixdiv.js"></script>
											<script type="text/javascript" src="/static/index/js/address.js"></script>
										</li>

										<li>
											<input type="radio" name="a01" class="Checkbox" id="check1">
							        		<label for="check1" class="xu02">仅显示有货</label>
										</li>

										<li>
											<input type="radio" name="a01" class="Checkbox" id="check2">
							        		<label for="check2" class="xu02">仅显示包邮</label>
										</li>
									</ul>
								</div>
								-->

								</form>

								<div class="Shopping-Mall-3-1-right-3">
									<ul class="clearfix">
										<?php if(!empty($goods_list)){ foreach($goods_list as $k=>$v){?>
										<li>
											<div class="Shopping-Mall-3-1-right-3-1">
												<a href="<?=url('index/goods/goodsDetail',['goods_id'=>$v['goods_id']])?>">
													<span class="Shopping-Mall-3-1-right-3-2">
														<span></span>
														<img src="/<?=$v['original_img']?>" alt="" />
													</span>
													<div>
														<strong class="clearfix">
															<span>¥ <?=$v['shop_price']?></span>
															<i>已售<b><?=$v['sales_sum']?></b>件</i>
														</strong>
														<h2><?=$v['goods_name']?></h2>
														<!--
														<h4 class="clearfix">
															<span>湖北 十堰</span>
															<i>1000km</i>
														</h4>
														-->
														<h3 class="clearfix">
															<span><?=$v['getShop']['shop_name']?></span>
															<strong><?=$v['getShop']['shop_type_name']?></strong>
														</h3>
													</div>
												</a>
												<h4 class="clearfix">
													<a href="javascript:void(0)" onclick="GoodsCollect(<?=$v['goods_id']?>)" class="Shopping-Mall-3-1-right-3-3 <?=hasCollect($v['goods_id'])?'active-22':''?>">收藏</a>
													<a href="#" class="Shopping-Mall-3-1-right-3-4 active-23">加入购物车</a>
													<!--active-22 active-22 表示用户登陆后已经收藏或将该商品加入例如购物车。添加该样式-->
												</h4>
											</div>
										</li>
										<?php }}else{ ?>
										<div class="text">暂无商品</div>
										<?php } ?>
									</ul>
								</div>

								<?php if(!empty($goods_list)){?>
								<div class="Shopping-Mall-3-1-right-4 clearfix">
									<div class="fy clearfix" id="clipDIV">
										<?=$goods_list->render()?>
									</div>
								</div>
								<?php }?>

								<div class="tc-z">
									<div class="tc-z-1">
										<form>
										<a class="active-25"></a>
										<h3 class="clearfix">
											<a href="#">没有账号？去注册 》</a>
										</h3>
										<h2>
											<strong>账户登录</strong>
											<span><i></i></span>
										</h2>
										<ul>
											<li class="tc-z-2 clearfix">
												<span></span>
												<input type="text" name="" placeholder="邮箱/用户名/已认证手机" />
											</li>
											<li class="tc-z-3 clearfix">
												<span></span>
												<input type="text" name="" placeholder="密码" />
											</li>
										</ul>
										<div class="tc-z-4 clearfix">
											<span class="clearfix">
												<input type="radio" name="a03" id="check3">
							        			<label for="check3">仅显示有货</label>
											</span>
											<a href="#">忘记密码</a>
										</div>
										<button type="submit">登录</button>
										<a class="a07" href="#">其他登录方式</a>
										</form>
									</div>
								</div>

								<script type="text/javascript">
									$(document).ready(function(){
									  $(".active-25").click(function(){
									    $(".tc-z").toggle();
									  });
									});
								</script>

							</div>

						</div>

					</div>

				</div>
{/block}


{block name="js"}
<script src="__STATIC__/index/js/global.js"></script>

<script type="text/javascript">

	//        更多
	$('.gd_more').parent().click(function(){
		var jed = $(this).parents('.lr-more').siblings();
		jed.toggleClass('ov-inh').find('.brand-box').toggleClass('ov-inh');
		if(jed.toggleClass('ov-inh').find('.brand-list')){
			jed.toggleClass('ov-inh').find('.brand-list').toggleClass('ov-inh');
		}
		if(jed.hasClass('ov-inh')){
			$(this).find('.gd_more').html('收起');
		}else{
			$(this).find('.gd_more').html('更多');
		}
	})
	var cancelBtn = null;
	/***多选 start*****/
	$('.dx_choice').parent().click(function(){
		var _this = this;
		var st = 0;
		var jed = $(_this).parents('.ri-section'); //当前选项层DIV

		//关闭前一个多选框
		if(cancelBtn != null){
			$(cancelBtn).parent().siblings('.clearfix').find('a').each(function(i,o){
				$(o).removeClass('addhover-js').find('.litt-zd').hide(); //针对品牌筛选的红色边框和右下角对勾隐藏
				$(o).removeClass('red_hov_cli')    //针对纯文字型选项，隐藏筛选的选中状态
						.attr('href',$(o).data('href'))  //还原连接
						.children('input').prop('checked',false).hide(); //隐藏多选框
				$(o).unbind('click');
			});
			$(cancelBtn).parents('.lf-list').siblings('.lr-more').show(); //显示其它多选按钮
			$(cancelBtn).parents('.ri-section').removeClass('sum_ov_inh'); //移除多选样式

		}
		cancelBtn = jed.find('.u-cancel'); //前一个取消按钮

		//打开多选
		jed.addClass('sum_ov_inh'); //添加这一行的样式
		//遍历a标签
		jed.find('.clearfix>a').each(function(i,o){
			$(o).attr('href','javascript:;'); //移除连接
			$(o).children('input').show();  //显示多选框
			$(o).bind('click',function(){
				if($(o).hasClass('red_hov_cli')){
					//取消选中
					$(o).find('i').toggle()
					$(o).removeClass('addhover-js'); //针对品牌选项，改变筛选的选中状态
					$(o).removeClass('red_hov_cli')
					$(o).children('input').prop("checked",false);
					$(o).parent().siblings('.surclofix').children('.u-confirm').removeClass('u-confirm01');
					st--;
				}else{
					$(o).addClass('red_hov_cli')
					$(o).children('input').prop("checked",true);
					$(o).find('i').toggle()
					$(o).addClass('addhover-js');
					$(o).parent().siblings('.surclofix').children('.u-confirm').addClass('u-confirm01');
					st++;
				}
				//如果没有选中项,确定按钮点不了
				if(st==0){
					jed.find('.u-confirm').disabled=true;
				}
			});
		});
		//隐藏当前多选按钮
		$(_this).parent().hide();
	});

	/***多选 end*****/
	//############   取消多选        ###########
	$('.surclofix .u-cancel').each(function(){
		$(this).click(function(){
			var jed = $(this).parents('.ri-section');
			//遍历a标签
			jed.find('.clearfix>a').each(function(i,o){
				$(o).removeClass('addhover-js').find('.litt-zd').hide(); //针对品牌筛选的红色边框和右下角对勾隐藏
				$(o).removeClass('red_hov_cli')    //针对纯文字型选项，隐藏筛选的选中状态
						.attr('href',$(o).data('href'))  //还原连接
						.children('input').prop('checked',false).hide(); //隐藏多选框
				$(o).unbind('click');
			});
			jed.find('.lr-more').show(); //显示多选按钮
			jed.removeClass('sum_ov_inh') //移除这一行的样式
			$('.u-confirm').removeClass('u-confirm01'); //移除确定按钮可点击标识
		});
	})

	$(function() {
		//左侧边栏JS
//		ajax_hot_goods();
//		ajax_sales_goods();
		//############   更多类别属性筛选  start     ###########
		$('.moreamore').click(function(){
			$('.m-tr').each(function(i,o){
				if(i >  7){
					var attrdisplay = $(o).css('display');
					if(attrdisplay == 'none'){
						$(o).css('display','block');
					}
					if(attrdisplay == 'block'){
						$(o).css('display','none');
					}
				}
			});
			if($(this).hasClass('checked')){
				$(this).removeClass('checked').html('<a class="red">收起</a>');
			}else{
				$(this).addClass('checked').html('<a >更多选项</a>');
			}
		})
		$('.moreamore').trigger('click').html('<a >更多选项</a>'); //  默认点击一下
		//############   更多类别属性筛选   end    ###########


		/***价格排序 start*****/
		var price_i = 0;
		$('.f-sort ul li').click(function(){
			$(this).addClass('red').siblings().removeClass('red').find('i').removeClass('litt-zzx2').removeClass('litt-zzx3').addClass('litt-zzx1');
			var jd = $(this).find('i');
			price_i++;
			if(price_i>2)price_i=1;
			switch(price_i){
				case 1:jd.addClass('litt-zzx2').removeClass('litt-zzx1').removeClass('litt-zzx3');break;
				case 2:jd.addClass('litt-zzx3').removeClass('litt-zzx2').removeClass('litt-zzx1');break;
			}
		})
		/***价格排序 end*******/


		/***滑过浏览商品 end***/
	})


	//############   点击多选确定按钮      ############
// t 为类型  是品牌 还是 规格 还是 属性
// btn 是点击的确定按钮用于找位置
	get_parment = <?php echo json_encode($_GET); ?>;
	function submitMoreFilter(t,btn)
	{
		// 没有被勾选的时候
		if(!$(btn).hasClass("u-confirm01")){
			return false;
		}

		// 获取现有的get参数
		var key = ''; // 请求的 参数名称
		var val = new Array(); // 请求的参数值
		$(btn).parent().siblings(".clearfix").find(".red_hov_cli").each(function(i,o){
			key = $(o).data('key');
			val.push($(o).data('val'));
		});
		//parment = key+'_'+val.join('_');
//        return false;
		// 品牌
		if(t == 'brand')
		{
			get_parment.brand_id = val.join('_');
		}
		// 规格
		if(t == 'spec')
		{
			if(get_parment.hasOwnProperty('spec'))
			{
				get_parment.spec += '@'+key+'_'+val.join('_');
			}
			else
			{
				get_parment.spec = key+'_'+val.join('_');
			}
		}
		// 属性
		if(t == 'attr')
		{
			if(get_parment.hasOwnProperty('attr'))
			{
				get_parment.attr += '@'+key+'_'+val.join('_');
			}
			else
			{
				get_parment.attr = key+'_'+val.join('_');
			}
		}
		// 组装请求的url
		var url = '';
		for ( var k in get_parment )
		{
			url += "&"+k+'='+get_parment[k];
		}
		url = "<?=url('index/goods/goodsList')->suffix(false)?>?"+url;
		//console.log(url);
		//console.log('get_parment',get_parment);
		location.href = url;
	}


	//媒体查询
	/*$(function(){
        window.onresize=resizeauto;
        resizeauto();
        function resizeauto(){
            var windowW = $(window).width();
            if(windowW > 1447){
                $('.w1430,.w1224,.w1000').addClass('w1430').removeClass('w1224').removeClass('w1000');
            }else if(windowW <= 1447 && windowW > 1241){
                $('.w1430,.w1224,.w1000').addClass('w1224').removeClass('w1430').removeClass('w1000');
            }else if(windowW <= 1241){
                $('.w1430,.w1224,.w1000').addClass('w1000').removeClass('w1224').removeClass('w1430');
            }
        }
    })*/
</script>

<script>
	function GoodsCollect($id,$type=0){
		if($type>1){
			layer.msg('参数失败');
		}
		let data = {};
		if($type == 0){
			data = {type:$type,'goods_id':$id};
		}else{
			data = {type:$type,'shop_id':$id};
		}
		$.ajax({
			type:'post',
			url:"<?=url('common/GoodsCollect/create')?>",
			data:data,
			dataType:'json',
			success:function(res){
				layer.msg(res.msg);
			},
			error:function(res){

			}
		});
	}
</script>

{/block}
